package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 订单明细实体（用户模块）
 * </p>
 *
 * @author lhy
 * @since 2021-10-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_orderInfo")
public class OrderInfoBean extends Model {

    private static final long serialVersionUID = 1L;

    /**
     * 订单明细主键（自增）
     */
    @TableId(value = "orderInfoId", type = IdType.AUTO)
    private Integer orderInfoId;

    /**
     * 订单外键
     */
    @TableField("orderCode")
    private String orderCode;

    /**
     * 商品id
     */
    private int productId;

    /**
     * 商品名
     */
    @TableField("productName")
    private String productName;

    /**
     * 商品图片地址
     */
    @TableField("productImg")
    private String productImg;

    /**
     * 商品成交价格
     */
    @TableField("productPrice")
    private String productPrice;

    /**
     * 购买数量
     */
    @TableField("buyNum")
    private Integer buyNum;

    public OrderInfoBean() {
    }

    public OrderInfoBean(int productId, String productName, String productImg, String productPrice, Integer buyNum) {
        this.productId = productId;
        this.productName = productName;
        this.productImg = productImg;
        this.productPrice = productPrice;
        this.buyNum = buyNum;
    }
}
